﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ILogger.cs" company="Rolosoft Ltd">
//   © Rolosoft Ltd
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

#region License

// Copyright 2013 Rolosoft Ltd
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

namespace Rsft.Net.Dns.Interfaces
{
    #region Usings

    using System;
    using System.Diagnostics.Contracts;

    #endregion

    /// <summary>
    /// The Logger interface.
    /// </summary>
    [ContractClass(typeof(LoggerContracts))]
    public interface ILogger
    {
        #region Public Methods and Operators

        /// <summary>
        /// The critical.
        /// </summary>
        /// <param name="exception">The exception.</param>
        /// <param name="eventId">The event id.</param>
        /// <param name="rethrowException">if set to <c>true</c> [rethrow exception].</param>
        void Critical(Exception exception, int eventId, bool rethrowException = false);

        /// <summary>
        /// The critical.
        /// </summary>
        /// <param name="eventId">
        ///     The event id.
        /// </param>
        /// <param name="message">
        ///     The message.
        /// </param>
        /// <param name="args">
        ///     The args.
        /// </param>
        void Critical(int eventId, string message, object[] args = null);

        /// <summary>
        /// The critical.
        /// </summary>
        /// <param name="message">
        ///     The message.
        /// </param>
        /// <param name="args">
        ///     The args.
        /// </param>
        void Critical(string message, object[] args = null);

        /// <summary>
        /// The error.
        /// </summary>
        /// <param name="exception">The exception.</param>
        /// <param name="eventId">The event id.</param>
        /// <param name="rethrowException">if set to <c>true</c> [rethrow exception].</param>
        void Error(Exception exception, int eventId, bool rethrowException = false);

        /// <summary>
        /// The error.
        /// </summary>
        /// <param name="eventId">
        ///     The event id.
        /// </param>
        /// <param name="message">
        ///     The message.
        /// </param>
        /// <param name="args">
        ///     The args.
        /// </param>
        void Error(int eventId, string message, object[] args = null);

        /// <summary>
        /// The error.
        /// </summary>
        /// <param name="message">
        ///     The message.
        /// </param>
        /// <param name="args">
        ///     The args.
        /// </param>
        void Error(string message, object[] args = null);

        /// <summary>
        /// The information.
        /// </summary>
        /// <param name="exception">The exception.</param>
        /// <param name="eventId">The event id.</param>
        /// <param name="rethrowException">if set to <c>true</c> [rethrow exception].</param>
        void Information(Exception exception, int eventId, bool rethrowException = false);

        /// <summary>
        /// The information.
        /// </summary>
        /// <param name="eventId">
        ///     The event id.
        /// </param>
        /// <param name="message">
        ///     The message.
        /// </param>
        /// <param name="args">
        ///     The args.
        /// </param>
        void Information(int eventId, string message, object[] args = null);

        /// <summary>
        /// The information.
        /// </summary>
        /// <param name="message">
        ///     The message.
        /// </param>
        /// <param name="args">
        ///     The args.
        /// </param>
        void Information(string message, object[] args = null);

        /// <summary>
        /// The warning.
        /// </summary>
        /// <param name="exception">The exception.</param>
        /// <param name="eventId">The event id.</param>
        /// <param name="rethrowException">if set to <c>true</c> [rethrow exception].</param>
        void Warning(Exception exception, int eventId, bool rethrowException = false);

        /// <summary>
        /// The warning.
        /// </summary>
        /// <param name="eventId">
        ///     The event id.
        /// </param>
        /// <param name="message">
        ///     The message.
        /// </param>
        /// <param name="args">
        ///     The args.
        /// </param>
        void Warning(int eventId, string message, object[] args = null);

        /// <summary>
        /// The warning.
        /// </summary>
        /// <param name="message">
        ///     The message.
        /// </param>
        /// <param name="args">
        ///     The args.
        /// </param>
        void Warning(string message, object[] args = null);
        
        /// <summary>
        /// The Verbose.
        /// </summary>
        /// <param name="exception">The exception.</param>
        /// <param name="eventId">The event id.</param>
        /// <param name="rethrowException">if set to <c>true</c> [rethrow exception].</param>
        void Verbose(Exception exception, int eventId, bool rethrowException = false);

        /// <summary>
        /// The Verbose.
        /// </summary>
        /// <param name="eventId">
        ///     The event id.
        /// </param>
        /// <param name="message">
        ///     The message.
        /// </param>
        /// <param name="args">
        ///     The args.
        /// </param>
        void Verbose(int eventId, string message, object[] args = null);

        /// <summary>
        /// The Verbose.
        /// </summary>
        /// <param name="message">
        ///     The message.
        /// </param>
        /// <param name="args">
        ///     The args.
        /// </param>
        void Verbose(string message, object[] args = null);

        #endregion
    }
}